package com.itheima.springbootquickstart.controller;

import com.itheima.springbootquickstart.pojo.User;
import com.itheima.springbootquickstart.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * UserController
 *
 * @author zhaokf
 * @date 2024/11/12
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    @GetMapping("/findById")
    public User findById(Long id) {
        return userService.findById(id);
    }
}
